package com.pucong.gitee.database.backup.business.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pucong.gitee.database.backup.common.entity.sys.SysUserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户基础信息 mapper
 *
 * @author pucong
 * @company gitee.com/pucong
 * @create 2020-12-01
 */
public interface SysUserInfoMapper extends BaseMapper<SysUserInfo> {
    /**
     * 递归查询创建的子用户
     * @param uuid
     * @return
     */
    List<String> selectChildrenUserId(@Param("uuid") String uuid);

    /**
     * 分页查询用户
     * @param page
     * @param sysUserInfo
     * @param userId
     * @return
     */
    IPage<SysUserInfo> getRmUserInfoListByPage(Page<SysUserInfo> page, @Param("sysUserInfo") SysUserInfo sysUserInfo, @Param("userId") String userId);
}
